Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support querying at particular blocks #44

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Conversation

tlovell-sxt
Copy link
Contributor

Rationale for this change

Currently, both the rust and javascript clients perform queries at the latest block. We want to be able to perform queries at older blocks too. This is especially important for the chainlink use case, as chainlink's DON will perform the same query multiple times, expecting the same results from each run. To this end, this changes both clients and their underlying functions to accept an optional block hash.

What changes are included in this PR?

  • rust client updated to accept an optional block ref with queries
  • rust CLI updated to accept an optional block hash
  • javascript client updated to accept an optional block hash

Are these changes tested?

Only localy, no automated tests as these are difficult with the current stateful structure of the affected code.

Copy link

github-actions bot commented Nov 25, 2024

0.4.0

Features

  • support querying at particular blocks (8502fbc

@tlovell-sxt tlovell-sxt force-pushed the feat/query-at-block branch 2 times, most recently from 9b1246c to dfc075f Compare November 25, 2024 21:10
@tlovell-sxt tlovell-sxt changed the title feat!: support querying at particular blocks feat: support querying at particular blocks Nov 25, 2024
Currently, both the rust and javascript clients perform queries at the
latest block. We want to be able to perform queries at older blocks too.
This is especially important for the chainlink use case, as chainlink's
DON will perform the same query multiple times, expecting the same
results from each run. To this end, this changes both clients and their
underlying functions to accept an optional block hash.
@tlovell-sxt tlovell-sxt merged commit 61f36b8 into main Nov 25, 2024
8 checks passed
@tlovell-sxt tlovell-sxt deleted the feat/query-at-block branch November 25, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants